package com.my12306.train.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.my12306.common.model.vo.PageVo;
import com.my12306.common.util.PageUtils;
import com.my12306.common.util.response.ResponseData;
import com.my12306.train.model.entity.TrainEntity;
import com.my12306.train.model.vo.TrainVo;

import java.util.List;

/**
 * 列车表
 *
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
public interface TrainService extends IService<TrainEntity> {
    /**
     * 分页查询列车类型
     *
     * @param pageVo
     * @return
     */
    PageUtils queryTrainPage(PageVo pageVo);

    /**
     * 分页查询的总数
     *
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryTrainCount(PageVo pageVo, int logicDelete);

    /**
     * 添加一辆列车
     * @param train
     * @return
     */
    Long saveTrain(TrainEntity train);

    /**
     * 修改列车
     *
     * @param train
     */
    void updateTrainById(TrainVo train);

    /**
     * 根据trainId查询
     * @param trainId
     * @return
     */
    TrainEntity queryTrainByTrainId(Long trainId);

    /**
     * 批量删除列车
     *
     * @param trainIds
     * @return
     */
    ResponseData deleteTrainBatchByIds(List<Long> trainIds);

    /**
     * 查询所有列车
     * @param logicDelete
     * @return
     */
    List<TrainEntity> queryAllTrain(int logicDelete);

    /**
     * 查询所有列车类型
     * @param logicDelete
     * @return
     */
    List<String> queryAllTrainType(int logicDelete);
}

